package com.ynet.middleground.approve.bean;

import java.util.List;
import java.util.Map;

import javax.validation.constraints.NotBlank;

import com.ynet.core.common.BaseReqObj;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author liulx
 * @description 启动流程请求类
 * @date 2019-10-25 15:31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel
public class StartProcessInstanceReq extends BaseReqObj {

    private static final long serialVersionUID = 6791072575933251744L;

    @ApiModelProperty(value = "可以处理该流程实例的渠道标志，若传多个，用英文逗号隔开，例：C01,C02; 默认：当前请求渠道",
        notes = "可以处理该流程实例的渠道标志，若传多个，用英文逗号隔开，例：C01,C02; 默认：当前请求渠道", dataType = "String")
    private String flowCanOperateChannelSignal;

    @ApiModelProperty(value = "流程定义KEY（模板ID）", notes = "流程定义KEY（模板ID）", required = true, dataType = "String")
    @NotBlank(message = "流程定义Key不能为空")
    private String processDefinitionKey;

    @ApiModelProperty(value = "流程发起人", notes = "流程发起人", required = true, dataType = "String")
    @NotBlank(message = "流程发起人不能为空")
    private String startUserId;

    @ApiModelProperty(value = "关联业务人（流程的主体用户），为空时默认与流程发起人字段保持一致", notes = "关联业务人（流程的主体用户），为空时默认与流程发起人字段保持一致",
        dataType = "String")
    // @NotBlank(message = "关联业务人不能为空")
    private String businessUser;

    @ApiModelProperty(value = "关联业务Key", notes = "关联业务Id", dataType = "String")
    private String businessKey;

    @ApiModelProperty(value = "意见备注", notes = "意见备注", dataType = "String")
    private String comment;

    @ApiModelProperty(value = "公司名称", notes = "公司名称", dataType = "String")
    private String companyName;

    @ApiModelProperty(value = "产品名称", notes = "产品名称", dataType = "String")
    private String productName;

    @ApiModelProperty(value = "流程摘要", notes = "流程摘要", dataType = "String")
    private String processRemark;

    @ApiModelProperty(value = "流程优先级；0：一般；1：紧急;默认：0", notes = "流程优先级；0：一般；1：紧急;默认：0", dataType = "Integer")
    private Integer processPriority = 0;

    @ApiModelProperty(value = "业务场景", notes = "业务场景", dataType = "String")
    private String businessScene;

    @ApiModelProperty(value = "业务数据", notes = "业务数据")
    private List<BusinessModuleData> businessData;

    @ApiModelProperty(value = "移动审批待签章文件列表", notes = "移动审批待签章文件列表")
    private List<FilesToBeSignedBean> toBeSignedList;

    @ApiModelProperty(value = "金控经办人员Id", notes = "金控经办人员Id", dataType = "Integer")
    private Integer qdpfOperatorId;

    @ApiModelProperty(value = "实际业务发起时间，时间戳（若上传该字段，移动审批流程发起时间则以此值为准）", notes = "实际业务发起时间，时间戳（若上传该字段，移动审批流程发起时间则以此值为准）",
        dataType = "String")
    private String businessStartTime;

    // todo: 需要考虑是否验证发起业态的有效性
    @ApiModelProperty(value = "发起业态 id", notes = "发起业态 id", dataType = "String")
    private String startFormatId;

    @ApiModelProperty(value = "自定义参数", notes = "自定义参数", dataType = "java.util.Map")
    private Map<String, Object> variables;

}
